﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ARS.Common.Entitys
{
    public class PageList<T>
    {

        public IList<T> Lists { get; set; } = new List<T>();

        public Page Page { get; set; } = new Page();
    }

    public class Page
    {
        /// <summary>
        /// 当前页码
        /// </summary>
        public int PageIndex { get; set; }


        /// <summary>
        /// 每页个数
        /// </summary>
        public int PageSize { get; set; } = 50;


        /// <summary>
        /// 数据总条数
        /// </summary>
        public long TotalCount { get; set; }
        /// <summary>
        /// 总页数
        /// </summary>
        public int TotalPage => (int)((TotalCount % PageSize == 0) ? (TotalCount / PageSize) : (TotalCount / PageSize) + 1);

        /// <summary>
        /// 每页显示页数
        /// </summary>
        public int DisplayCount { get; set; } = 10;
    }

}
